import java.io.EOFException;
import java.io.IOException;

public class TestTryCatch {
public static void main(String args[]) throws Exception {
try {
ma(1);
System.out.println("No Exception");
} catch (EOFException ex1) { System.out.println("ex1");
} catch (IOException ex2) {
System.out.println("ex2");	}
}
public static void ma(int n) throws Exception {
if (n == 1) {
throw new IOException();
} else if (n == 2) {
throw new EOFException();
}
}
}
